/*
 * Copyright (c) GoKeep by gokeep.org. 2022-2023. All rights reserved
 */
package org.gokeep.common.config;

import lombok.AccessLevel;
import lombok.NoArgsConstructor;

@NoArgsConstructor(access = AccessLevel.PRIVATE)
public class GlobalConfig {
    /**
     * 项目包名
     */
    public static final String APPLICATION_PACKAGE = "org.gokeep";
    /**
     * 签发者
     */
    public static final String DEFAULT_ISSUER_NAME = "gokeep.org";

    /**
     * 协议头信息，自定义，所有消息开头均为此
     */
    public static final int MESSAGE_PROTOCOL_HEAD = 48763694;

    /**
     * 消息协议版本
     */
    public static final int MESSAGE_VERSION = 1;

    /**
     * 管理员用户名
     */
    public static final String ADMIN_USER_NAME = "admin";

    /**
     * 管理员密码
     */
    public static final String ADMIN_USER_PASSWORD = "123456";


    /**
     * 管理员昵称
     */
    public static final String ADMIN_NICKNAME = "管理员";

    /**
     * 默认线程数
     */
    public static final int DEFAULT_SOCKET_THREAD_NUM = Runtime.getRuntime().availableProcessors() + 1;

    /**
     * 默认企业名称
     */
    public static final String DEFAULT_COMPANY_NAME = "GoKeep";

    /**
     * 文件存储bucket
     */
    public static final String STRONG_BUCKET_NAME = "gokeep";

    /**
     * FlaskID缓存配置
     */
    public static final String FLAKE_CACHE_KEY = "GO_KEEP_FLASK_CACHE";

    /**
     * 用户目录
     */
    public static final String HOME_DIR_PATH = System.getProperty("user.home");

    /**
     * 配置文件目录名称Separate
     */
    public static final String CONFIG_FILE_DIR_NAME = ".gokeep";


    /**
     * 路径分隔符号
     */
    public static final String PATH_SEPARATE = "/";
    /**
     * key_store文件名称
     */
    public static final String KEY_STORE_FILE_NAME = "keystore.json";


    /**
     * 默认RSA的key长度
     */
    public static final int DEFAULT_RSA_KEY_SIZE = 318;

    /**
     * token失效时间
     */
    public static final int TOKEN_EXPIRE_TIME_OF_DAY = 30;

    /**
     * 配置文件目录路径
     */
    public static final String CONFIG_FILE_DIR_PATH = HOME_DIR_PATH + PATH_SEPARATE + CONFIG_FILE_DIR_NAME + PATH_SEPARATE;
}
